package com.config.controller;


import com.config.entity.Courses;
import com.config.service.CoursesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/classes")
public class CoursesController {

    @Autowired
    private CoursesService coursesService;
    @GetMapping("/list")
    public List<Courses> findClasses(){
        return coursesService.findCourses();
    }
}
